<%@ page contentType="text/html;charset=UTF-8"%>

<%@ page import="java.util.Vector,com.ejoysoft.wlanyz.business.Sitetest,com.ejoysoft.common.Constants,com.ejoysoft.common.exception.NoRightException" %>
<%@page import="sun.reflect.generics.tree.IntSignature"%>
<%@page import="com.ejoysoft.common.Format"%>
<%@ page import="java.util.List"%>
<%@ include file="../include/jsp/head.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
	String  strId = request.getParameter("ckb");
	String s[] = strId.split(",");
%>
<%
	//初始化
	Sitetest task0 = null;
	Sitetest obj = new Sitetest(globa);
	//查询条件
	String tWhere = "and wlan_test_result.strnettype='TD'";
	if(s.length>0){
		tWhere = "and (wlan_test_result.strid='"+s[0]+"'";
		for(int j=1;j<s.length;j++){
			tWhere = tWhere +  " or wlan_test_result.strid='"+s[j]+"'";
		}
		tWhere += ")";
	}
	
	//记录总数
	int intAllCount = obj.getCount(tWhere);
	//当前页
	int intCurPage = globa.getIntCurPage();
	//每页记录数
	String strPageSize = "10";
	int intPageSize;
	if (strPageSize.equals("所有"))
		intPageSize = intAllCount;
	else
		intPageSize = Integer.parseInt(strPageSize);
	//共有页数
	int intPageCount = (intAllCount - 1) / intPageSize + 1;
	// 循环显示一页内的记录 开始序号
	int intStartNum = (intCurPage - 1) * intPageSize + 1;
	//结束序号
	int intEndNum = intCurPage * intPageSize;
	//获取到当前页面的记录集
	Vector<Sitetest> vctObj = obj.list(tWhere, intStartNum, intPageSize);
	//获取当前页的记录条数
	int intVct = (vctObj != null && vctObj.size() > 0 ? vctObj.size(): 0);
	//System.out.println("TD查找的个数："+intVct);
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>随机现场测试TD网络测试详细结果查看</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link href="../css/main.css" rel="stylesheet" type="text/css" />
	<script language="JavaScript" src="../include/date/popc.js"></script>
	<script src="../include/js/list.js"></script>
	<script language="javascript">
	 function check(){
           var checkboxs = document.getElementsByName("ckb");
           var rvalue = "";
           if(checkboxs.length > 0){
	           for(var i=0;i<checkboxs.length;i++){
	                if(checkboxs[i].checked == true){	                
	                		rvalue = rvalue + checkboxs[i].value + ",";
	                }
	           }
	           return rvalue;
           } else{
           return null;
           }
   		 }
	 function showimage(){
	 	var ckbValue = check();
	 	var s=ckbValue.split(",");
	 	if(s.length>2){
	 		alert("只能选择一个任务！");
	 	}
	 	else{
	 		if(ckbValue != "")
	 			window.open ('siteTD_showimage.jsp?ckb=' + s[0] ,'newwin','height=500,width=500,top=150,left=400,toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no')
 			else alert("请先选中一项任务！");
	 	} 	
 	}
</script>
  </head>
  
  <body>
    <form name=frm1 method=post target="newwin" action="testanalysis/siteTD_showimage.jsp">
 <table width="3080" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="20" valign="middle">
    <input type="button" value="查看上传图片" onclick="showimage()"/>
    </td>
  </tr>
  <tr>
  	<td width="20" class="listtit">&nbsp;</td>   
    <td width="100" class="listtit">地市</td>
    <td width="100" class="listtit">区县</td>
    <td width="100" class="listtit">小区</td>
    <td class="listtit" width="100">是否合格</td>
    <td width="140" class="listtit">关联成功率</td>
    <td width="140" class="listtit">AP关联时延</td>
    <td width="140" class="listtit">WEB认证成功率</td>
    <td width="140" class="listtit">WEB下线成功率</td>
    <td width="140" class="listtit">PEAP认证成功率</td>
    <td width="140" class="listtit">PEAP下线成功率</td>    
    <td width="140" class="listtit">HTTP认证成功率</td>
    <td width="140" class="listtit">PING成功率</td>
    <td width="140" class="listtit">FTP上行成功率</td>
    <td width="140" class="listtit">FTP下行成功率</td>   
    <td width="140" class="listtit">隔离成功率</td>
    <td width="140" class="listtit">漫游成功率</td>
    <td width="140" class="listtit">WEB上行时延</td>
    <td width="140" class="listtit">WEB下行时延</td>  
    <td width="140" class="listtit">PEAP上行时延</td>
    <td width="140" class="listtit">HTTP响应时延</td>
    <td width="140" class="listtit">PING时延</td>
    <td width="140" class="listtit">FTP上行速率</td>
    <td width="140" class="listtit">FTP下行速率</td>
  </tr>
    <%
    	for (int i = 0;i < vctObj.size(); i++) {
    		String strid = "";
    		
    		String strcity = "";
    		String strtown = "";
    		String strcomm = "";
    		
                  String strtext="";
                  String strrelevacyrate="";
                  String strrelevacydelay="";                
                  String strwebauthsuc = "";
                  String strweboffsuc = ""; 
                  String strpeapauthsuc = "";
                  String strpeapoffsuc = "";                  
                  String strhttpreqsuc = "";
                  String strpingsuc ="";
                  String strftpupsuc ="";
                  String strftpdownsuc="";                  
                  String strsegsuc = "";
                  String strroamsuc = "";
                  String strwebupdelay = "";
                  String strwebdowndelay = "";                 
                  String strpeapupdelay = "";
                  String strhttprespdelay = "";
                  String strpingdelay = "";
                  String strftpupspeed = "";
                  String strftpdownspeed = "";
                  
                  Sitetest obj1 = vctObj.get(i);                
                  strsegsuc = Format.forbidNull(obj1.getIntuser_seg_sucrate());
                  strroamsuc = Format.forbidNull(obj1.getIntuser_roam_sucrate());
                  strwebupdelay = Format.forbidNull(obj1.getIntweb_up_delay());
                  strwebdowndelay = Format.forbidNull(obj1.getIntweb_down_delay());               
                  strpeapupdelay = Format.forbidNull(obj1.getIntpeap_up_delay());
                  strhttprespdelay = Format.forbidNull(obj1.getInthttp_resp_delay());
                  strpingdelay = Format.forbidNull(obj1.getIntping_delay());
                  strftpupspeed = Format.forbidNull(obj1.getIntftp_up_speed());
                  strftpdownspeed = Format.forbidNull(obj1.getIntftp_down_speed()); 
                                   
				  strcity = Format.forbidNull(obj1.getStrcity());
				  strtown = Format.forbidNull(obj1.getStrtown());
				  strcomm = Format.forbidNull(obj1.getStrsitename());
				  
                  strtext = Format.forbidNull(obj1.getStrtext());
                  strrelevacyrate = Format.forbidNull(obj1.getIntap_relevacy_sucrate());
                  strrelevacydelay = Format.forbidNull(obj1.getIntap_relevacy_delay());
                  strwebauthsuc = Format.forbidNull(obj1.getIntweb_auth_sucrate());
                  strweboffsuc = Format.forbidNull(obj1.getIntweb_off_sucrate());                 
                  strpeapauthsuc = Format.forbidNull(obj1.getIntpeap_auth_sucrate());
                  strpeapoffsuc = Format.forbidNull(obj1.getIntpeap_off_sucrate());                  
                  strhttpreqsuc = Format.forbidNull(obj1.getInthttp_req_sucrate());
                  strpingsuc = Format.forbidNull(obj1.getIntping_sucrate());
                  strftpupsuc = Format.forbidNull(obj1.getIntftp_up_sucrate());
                  strftpdownsuc = Format.forbidNull(obj1.getIntftp_down_sucrate());
                  
                  
                  strid = Format.forbidNull(obj1.getStrid());      
    %>

  <tr>
  	<td class="listd1" width="20"><input type="checkbox" name="ckb" value="<%=strid %>"/></td>
    <td class="listd1" width="100"> <%=strcity %>&nbsp;</td>
    <td class="listd1" width="100"> <%=strtown %>&nbsp;</td>
    <td class="listd1" width="100"> <%=strcomm %>&nbsp;</td>
    <td class="listd1" width="100"><%=strtext%>&nbsp;</td>
    <td class="listd1" width="140"><%=strrelevacyrate %>&nbsp;</td>
    <td class="listd1" width="140"><%=strrelevacydelay %>&nbsp;</td>
    <td class="listd1" width="140"> <%=strwebauthsuc %>&nbsp;</td>
    <td class="listd1" width="140"> <%=strweboffsuc %>&nbsp;</td> 
    <td class="listd1" width="140"> <%=strpeapauthsuc %>&nbsp;</td> 
    <td class="listd1" width="140"> <%=strpeapoffsuc %>&nbsp;</td>    
    <td class="listd1" width="140"> <%=strhttpreqsuc %>&nbsp;</td> 
    <td class="listd1" width="140"> <%=strpingsuc %>&nbsp;</td>
    <td class="listd1" width="140"> <%=strftpupsuc %>&nbsp;</td> 
    <td class="listd1" width="140"> <%=strftpdownsuc %>&nbsp;</td>    
    <td class="listd1" width="140"> <%=strsegsuc %>&nbsp;</td> 
    <td class="listd1" width="140"> <%=strroamsuc %>&nbsp;</td>
    <td class="listd1" width="140"> <%=strwebupdelay %>&nbsp;</td> 
    <td class="listd1" width="140"> <%=strwebdowndelay %>&nbsp;</td>   
    <td class="listd1" width="140"> <%=strpeapupdelay %>&nbsp;</td> 
    <td class="listd1" width="140"> <%=strhttprespdelay %>&nbsp;</td>
    <td class="listd1" width="140"> <%=strpingdelay %>&nbsp;</td> 
    <td class="listd1" width="140"> <%=strftpupspeed %>&nbsp;</td>
    <td class="listd1" width="140"> <%=strftpdownspeed %>&nbsp;</td> 
  </tr>
             <%
            }
            %>
</table>
</form>
  </body>
</html>
